﻿
if (typeof ($) != "undefined") {
    $(document).ready(function () {
        try {

            var varStr = $("form").attr("action");
            var arr = varStr.split('&');
            var arr2 = new Array();
            for (var i = 1; i < arr.length; i++) {
                arr2.push(arr[i]);
            }
            var varCheck = arr2[0].substring(7, arr2[0].length);
            if (varCheck == "check") {
                $("#CourseName").attr("disabled", "disabled");
                $("#CourseCode").attr("disabled", "disabled");
                $("#CourseType").attr("disabled", "disabled");
                $("#MinStudents").attr("disabled", "disabled");
                $("#CourseCost").attr("disabled", "disabled");
                $("#MaxStudents").attr("disabled", "disabled");
                $("#NeedHour").attr("disabled", "disabled");
              
                $("#CourseContent").attr("disabled", "disabled");
                $("#CourseAim").attr("disabled", "disabled");
                $("#CourseCondition").attr("disabled", "disabled");
                $("#IsPublic").attr("disabled", "disabled");
                $("#Explain").attr("disabled", "disabled");
            }
        } catch (Error) { }
    })
}